package org.bcos.contract.source;

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.Future;
import org.bcos.channel.client.TransactionSucCallback;
import org.bcos.web3j.abi.EventEncoder;
import org.bcos.web3j.abi.EventValues;
import org.bcos.web3j.abi.TypeReference;
import org.bcos.web3j.abi.datatypes.Address;
import org.bcos.web3j.abi.datatypes.Event;
import org.bcos.web3j.abi.datatypes.Function;
import org.bcos.web3j.abi.datatypes.StaticArray;
import org.bcos.web3j.abi.datatypes.Type;
import org.bcos.web3j.abi.datatypes.Utf8String;
import org.bcos.web3j.abi.datatypes.generated.Bytes1;
import org.bcos.web3j.abi.datatypes.generated.Bytes32;
import org.bcos.web3j.abi.datatypes.generated.Uint256;
import org.bcos.web3j.crypto.Credentials;
import org.bcos.web3j.crypto.EncryptType;
import org.bcos.web3j.protocol.Web3j;
import org.bcos.web3j.protocol.core.DefaultBlockParameter;
import org.bcos.web3j.protocol.core.methods.request.EthFilter;
import org.bcos.web3j.protocol.core.methods.response.Log;
import org.bcos.web3j.protocol.core.methods.response.TransactionReceipt;
import org.bcos.web3j.tx.Contract;
import org.bcos.web3j.tx.TransactionManager;
import rx.Observable;
import rx.functions.Func1;

/**
 * Auto generated code.<br>
 * <strong>Do not modify!</strong><br>
 * Please use the <a href="https://docs.web3j.io/command_line.html">web3j command line tools</a>, or {@link org.bcos.web3j.codegen.SolidityFunctionWrapperGenerator} to update.
 *
 * <p>Generated with web3j version none.
 */
public final class NodeAction extends Contract {
    private static String BINARY = "6060604052341561000c57fe5b5b5b5b612aff8061001e6000396000f300606060405236156100ce576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063045ccf7b146100d057806324d3048d1461019b578063352272bd1461020d5780633a96fdd71461024357806346bdca9a146102f457806370b60760146103a95780639201de55146103cf5780639428522a1461047a578063b85edaf41461065d578063c73c27bc14610806578063cfb51928146108ad578063e0250c3614610923578063e623db461461095f578063f564bb8c14610a9a575bfe5b34156100d857fe5b6101126004808061080001906040806020026040519081016040528092919082604060200280828437820191505050505091905050610b08565b6040518080602001828103825283818151815260200191508051906020019080838360008314610161575b8051825260208311156101615760208201915060208101905060208303925061013d565b505050905090810190601f16801561018d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101a357fe5b6101f3600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610d02565b604051808215151515815260200191505060405180910390f35b341561021557fe5b610241600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061128e565b005b341561024b57fe5b6102de600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506112d3565b6040518082815260200191505060405180910390f35b34156102fc57fe5b61038f600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506115a0565b604051808215151515815260200191505060405180910390f35b34156103b157fe5b6103b96115b8565b6040518082815260200191505060405180910390f35b34156103d757fe5b6103f16004808035600019169060200190919050506115c6565b6040518080602001828103825283818151815260200191508051906020019080838360008314610440575b8051825260208311156104405760208201915060208101905060208303925061041c565b505050905090810190601f16801561046c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561048257fe5b6104d2600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506117b1565b60405180806020018060200180602001868152602001858152602001848103845289818151815260200191508051906020019080838360008314610535575b80518252602083111561053557602082019150602081019050602083039250610511565b505050905090810190601f1680156105615780820380516001836020036101000a031916815260200191505b508481038352888181518152602001915080519060200190808383600083146105a9575b8051825260208311156105a957602082019150602081019050602083039250610585565b505050905090810190601f1680156105d55780820380516001836020036101000a031916815260200191505b5084810382528781815181526020019150805190602001908083836000831461061d575b80518252602083111561061d576020820191506020810190506020830392506105f9565b505050905090810190601f1680156106495780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390f35b341561066557fe5b61067b6004808035906020019091905050611bd3565b604051808060200180602001806020018681526020018581526020018481038452898181518152602001915080519060200190808383600083146106de575b8051825260208311156106de576020820191506020810190506020830392506106ba565b505050905090810190601f16801561070a5780820380516001836020036101000a031916815260200191505b50848103835288818151815260200191508051906020019080838360008314610752575b8051825260208311156107525760208201915060208101905060208303925061072e565b505050905090810190601f16801561077e5780820380516001836020036101000a031916815260200191505b508481038252878181518152602001915080519060200190808383600083146107c6575b8051825260208311156107c6576020820191506020810190506020830392506107a2565b505050905090810190601f1680156107f25780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390f35b341561080e57fe5b6108246004808035906020019091905050611c20565b6040518080602001828103825283818151815260200191508051906020019080838360008314610873575b8051825260208311156108735760208201915060208101905060208303925061084f565b505050905090810190601f16801561089f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156108b557fe5b610905600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611ce7565b60405180826000191660001916815260200191505060405180910390f35b341561092b57fe5b6109416004808035906020019091905050611d18565b60405180826000191660001916815260200191505060405180910390f35b341561096757fe5b610a80600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611d43565b604051808215151515815260200191505060405180910390f35b3415610aa257fe5b610af2600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611fe7565b6040518082815260200191505060405180910390f35b610b106127a9565b610b186127bd565b60006000610b246127bd565b6040604051805910610b335750595b908082528060200260200182016040525b50935060009250600091505b6040821015610c215760007f0100000000000000000000000000000000000000000000000000000000000000028683604081101515610b8b57fe5b60200201517effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141515610c13578582604081101515610bc757fe5b60200201518484815181101515610bda57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535082806001019350505b5b8180600101925050610b50565b82604051805910610c2f5750595b908082528060200260200182016040525b509050600091505b82821015610cf5578382815181101515610c5e57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000028183815181101515610cb757fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b8180600101925050610c48565b8094505b50505050919050565b6000600060026001805490501015610d1d5760009150611288565b600090505b60018054905081101561128357610def83600183815481101515610d4257fe5b906000526020600020900160005b508054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610de55780601f10610dba57610100808354040283529160200191610de5565b820191906000526020600020905b815481529060010190602001808311610dc857829003601f168201915b50505050506115a0565b156112755761110f6000846040518082805190602001908083835b60208310610e2d5780518252602082019150602081019050602083039250610e0a565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060c06040519081016040529081600082018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610f055780601f10610eda57610100808354040283529160200191610f05565b820191906000526020600020905b815481529060010190602001808311610ee857829003601f168201915b50505050508152602001600182018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610fa75780601f10610f7c57610100808354040283529160200191610fa7565b820191906000526020600020905b815481529060010190602001808311610f8a57829003601f168201915b50505050508152602001600282018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156110495780601f1061101e57610100808354040283529160200191611049565b820191906000526020600020905b81548152906001019060200180831161102c57829003601f168201915b50505050508152602001600382018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156110eb5780601f106110c0576101008083540402835291602001916110eb565b820191906000526020600020905b8154815290600101906020018083116110ce57829003601f168201915b5050505050815260200160048201548152602001600582015481525050600061205e565b151561111e5760009150611288565b6000600180549050111561119157600160016001805490500381548110151561114357fe5b906000526020600020900160005b5060018281548110151561116157fe5b906000526020600020900160005b50908054600181600116156101000203166002900461118f9291906127d1565b505b60018054809190600190036111a69190612858565b506000836040518082805190602001908083835b602083106111dd57805182526020820191506020810190506020830392506111ba565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006000820160006112229190612884565b6001820160006112329190612884565b6002820160006112429190612884565b6003820160006112529190612884565b60048201600090556005820160009055505061126c61254b565b60019150611288565b5b8080600101915050610d22565b600091505b50919050565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b60006112dd6127bd565b6112e56127bd565b6000600086935085925083519150818351101561130157825191505b600090505b8181101561154657828181518110151561131c57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916848281518110151561139757fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161015611432577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9450611596565b828181518110151561144057fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191684828151811015156114bb57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191611156115375760019450611596565b5b5b8080600101915050611306565b825184511015611578577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9450611596565b82518451111561158b5760019450611596565b60009450611596565b5b5b5050505092915050565b600060006115ae84846112d3565b1490505b92915050565b600060018054905090505b90565b6115ce6127a9565b6115d66127bd565b6000600060006115e46127bd565b60206040518059106115f35750595b908082528060200260200182016040525b50945060009350600092505b60208310156116cf578260080260020a876001900402600102915060007f010000000000000000000000000000000000000000000000000000000000000002827effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415156116c15781858581518110151561168857fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535083806001019450505b5b8280600101935050611610565b836040518059106116dd5750595b908082528060200260200182016040525b509050600092505b838310156117a357848381518110151561170c57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f010000000000000000000000000000000000000000000000000000000000000002818481518110151561176557fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b82806001019350506116f6565b8095505b5050505050919050565b6117b96127a9565b6117c16127a9565b6117c96127a9565b600060006000866040518082805190602001908083835b6020831061180357805182526020820191506020810190506020830392506117e0565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405180910390206001016000876040518082805190602001908083835b6020831061186f578051825260208201915060208101905060208303925061184c565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405180910390206002016000886040518082805190602001908083835b602083106118db57805182526020820191506020810190506020830392506118b8565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405180910390206003016000896040518082805190602001908083835b602083106119475780518252602082019150602081019050602083039250611924565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405180910390206004015460008a6040518082805190602001908083835b602083106119b45780518252602082019150602081019050602083039250611991565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060050154848054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611a805780601f10611a5557610100808354040283529160200191611a80565b820191906000526020600020905b815481529060010190602001808311611a6357829003601f168201915b50505050509450838054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611b1c5780601f10611af157610100808354040283529160200191611b1c565b820191906000526020600020905b815481529060010190602001808311611aff57829003601f168201915b50505050509350828054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611bb85780601f10611b8d57610100808354040283529160200191611bb8565b820191906000526020600020905b815481529060010190602001808311611b9b57829003601f168201915b50505050509250945094509450945094505b91939590929450565b611bdb6127a9565b611be36127a9565b611beb6127a9565b60006000611bf76127a9565b611c0087611c20565b9050611c0b816117b1565b955095509550955095505b5091939590929450565b611c286127a9565b600182815481101515611c3757fe5b906000526020600020900160005b508054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611cda5780601f10611caf57610100808354040283529160200191611cda565b820191906000526020600020905b815481529060010190602001808311611cbd57829003601f168201915b505050505090505b919050565b6000611cf16127bd565b829050600081511415611d0a5760006001029150611d12565b602083015191505b50919050565b6000611d226127a9565b611d2b83611bd3565b505050915050611d3a81611ce7565b91505b50919050565b600060006000611d516128cc565b60009250600091505b600180549050821015611e4357611e2788600184815481101515611d7a57fe5b906000526020600020900160005b508054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611e1d5780601f10611df257610100808354040283529160200191611e1d565b820191906000526020600020905b815481529060010190602001808311611e0057829003601f168201915b50505050506115a0565b15611e355760019250611e43565b5b8180600101925050611d5a565b8215611e525760009350611fdc565b60018054806001018281611e66919061291b565b916000526020600020900160005b8a90919091509080519060200190611e8d929190612947565b505060c06040519081016040528089815260200188815260200187815260200186815260200160008152602001438152509050611ecb81600161205e565b1515611eda5760009350611fdc565b806000896040518082805190602001908083835b60208310611f115780518252602082019150602081019050602083039250611eee565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405180910390206000820151816000019080519060200190611f609291906129c7565b506020820151816001019080519060200190611f7d9291906129c7565b506040820151816002019080519060200190611f9a9291906129c7565b506060820151816003019080519060200190611fb79291906129c7565b506080820151816004015560a08201518160050155905050611fd761254b565b600193505b505050949350505050565b60006000826040518082805190602001908083835b6020831061201f5780518252602082019150602081019050602083039250611ffc565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405180910390206004015490505b919050565b600060006000600060006000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600014151561253b5761212a612125606060405190810160405280602381526020017f5b436f6e73656e737573436f6e74726f6c5d206c6f61642073797374656d416481526020017f64723a0000000000000000000000000000000000000000000000000000000000815250612117612614565b61262c90919063ffffffff16565b61265d565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1694508473ffffffffffffffffffffffffffffffffffffffff16631b5f03a66000604051606001526040518163ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001828103825260138152602001807f436f6e73656e737573436f6e74726f6c4d677200000000000000000000000000815250602001915050606060405180830381600087803b15156121f457fe5b6102c65a03f1151561220257fe5b50505060405180519060200180519060200180519050505093508373ffffffffffffffffffffffffffffffffffffffff16600014151561253a576122ba6122b5606060405190810160405280602c81526020017f5b436f6e73656e737573436f6e74726f6c5d206c6f616420436f6e73656e737581526020017f73436f6e74726f6c4d67723a00000000000000000000000000000000000000008152506122a7612614565b61262c90919063ffffffff16565b61265d565b8392508273ffffffffffffffffffffffffffffffffffffffff1663a74c2bb66000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401809050602060405180830381600087803b151561232957fe5b6102c65a03f1151561233757fe5b5050506040518051905091508173ffffffffffffffffffffffffffffffffffffffff166000141515612539576123e16123dc606060405190810160405280602481526020017f5b436f6e73656e737573436f6e74726f6c5d206c6f616420636f6e74726f6c4181526020017f6464723a000000000000000000000000000000000000000000000000000000008152506123ce612614565b61262c90919063ffffffff16565b61265d565b8190508615612491578073ffffffffffffffffffffffffffffffffffffffff166361fc6d1f6124138a60400151611ce7565b6000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b151561247257fe5b6102c65a03f1151561248057fe5b505050604051805190509550612540565b8073ffffffffffffffffffffffffffffffffffffffff1663f037c9066124ba8a60400151611ce7565b6000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b151561251957fe5b6102c65a03f1151561252757fe5b505050604051805190509550612540565b5b5b5b600195505b505050505092915050565b6000600060009150600090505b60018054905081101561260f5781806001019250600060018381548110151561257d57fe5b906000526020600020900160005b5060405180828054600181600116156101000203166002900480156125e75780601f106125c55761010080835404028352918201916125e7565b820191906000526020600020905b8154815290600101906020018083116125d3575b50509150509081526020016040518091039020600401819055505b8080600101915050612558565b5b5050565b61261c612a47565b6126266080612673565b90505b90565b612634612a47565b61264b8284602001516126be90919063ffffffff16565b83602001819052508290505b92915050565b61266f81600001518260200151612729565b5b50565b61267b612a47565b612683612a47565b82816000019063ffffffff16908163ffffffff1681525050602060405190810160405280600081525081602001819052508091505b50919050565b6126c66127a9565b60006000600084518651016040518059106126de5750595b908082528060200260200182016040525b50935060208601925060208501915060208401905061271081848851612752565b61271f86518201838751612752565b5b50505092915050565b6000600061273561279f565b91506000600060006000600060006000898b8a2f90505b50505050565b60005b60208210151561277b57825184526020840193506020830192505b602082039150612755565b6001826020036101000a039050801983511681855116818117865250505b50505050565b6000601090505b90565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061280a5780548555612847565b8280016001018555821561284757600052602060002091601f016020900482015b8281111561284657825482559160010191906001019061282b565b5b5090506128549190612a6e565b5090565b81548183558181151161287f5781836000526020600020918201910161287e9190612a93565b5b505050565b50805460018160011615610100020316600290046000825580601f106128aa57506128c9565b601f0160209004906000526020600020908101906128c89190612a6e565b5b50565b60c0604051908101604052806128e0612abf565b81526020016128ed612abf565b81526020016128fa612abf565b8152602001612907612abf565b815260200160008152602001600081525090565b815481835581811511612942578183600052602060002091820191016129419190612a93565b5b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061298857805160ff19168380011785556129b6565b828001600101855582156129b6579182015b828111156129b557825182559160200191906001019061299a565b5b5090506129c39190612a6e565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612a0857805160ff1916838001178555612a36565b82800160010185558215612a36579182015b82811115612a35578251825591602001919060010190612a1a565b5b509050612a439190612a6e565b5090565b604060405190810160405280600063ffffffff168152602001612a68612abf565b81525090565b612a9091905b80821115612a8c576000816000905550600101612a74565b5090565b90565b612abc91905b80821115612ab85760008181612aaf9190612884565b50600101612a99565b5090565b90565b6020604051908101604052806000815250905600a165627a7a7230582075a792acedbec247217ceb00485dbd041f6c54d275a5033781d11bc1da6e88950029";

    public static final String ABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"x\",\"type\":\"bytes1[64]\"}],\"name\":\"byte64ToString\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_id\",\"type\":\"string\"}],\"name\":\"cancelNode\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"setSystemAddr\",\"outputs\":[],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_a\",\"type\":\"string\"},{\"name\":\"_b\",\"type\":\"string\"}],\"name\":\"compare\",\"outputs\":[{\"name\":\"\",\"type\":\"int256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_a\",\"type\":\"string\"},{\"name\":\"_b\",\"type\":\"string\"}],\"name\":\"equal\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getNodeIdsLength\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"x\",\"type\":\"bytes32\"}],\"name\":\"bytes32ToString\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_id\",\"type\":\"string\"}],\"name\":\"getNode\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"},{\"name\":\"\",\"type\":\"string\"},{\"name\":\"\",\"type\":\"string\"},{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getNodeByIdx\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"},{\"name\":\"\",\"type\":\"string\"},{\"name\":\"\",\"type\":\"string\"},{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getNodeId\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"source\",\"type\":\"string\"}],\"name\":\"stringToBytes32\",\"outputs\":[{\"name\":\"result\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getNodeAgencyByIdx\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_id\",\"type\":\"string\"},{\"name\":\"_name\",\"type\":\"string\"},{\"name\":\"_agency\",\"type\":\"string\"},{\"name\":\"_caHash\",\"type\":\"string\"}],\"name\":\"registerNode\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_id\",\"type\":\"string\"}],\"name\":\"getNodeIdx\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"code\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"msg\",\"type\":\"string\"}],\"name\":\"LogMessage\",\"type\":\"event\"}]";

    private static String GUOMI_BINARY = "6060604052341561000c57fe5b5b5b5b612aff8061001e6000396000f300606060405236156100ce576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632e77b5fc146100d05780633a5ed08b14610181578063446a1fe1146101ef5780634df0ea461461029a5780634ef4f3091461047d5780635e21f872146104f357806377fa37c7146105655780637fc248e5146105a157806389458b07146106485780638fbfa12d146107f157806392d1474d14610817578063adc48fa114610952578063b372efc314610a07578063b516026614610ad2575bfe5b34156100d857fe5b61016b600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610b08565b6040518082815260200191505060405180910390f35b341561018957fe5b6101d9600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610dd5565b6040518082815260200191505060405180910390f35b34156101f757fe5b610211600480803560001916906020019091905050610e4c565b6040518080602001828103825283818151815260200191508051906020019080838360008314610260575b8051825260208311156102605760208201915060208101905060208303925061023c565b505050905090810190601f16801561028c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156102a257fe5b6102f2600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611037565b60405180806020018060200180602001868152602001858152602001848103845289818151815260200191508051906020019080838360008314610355575b80518252602083111561035557602082019150602081019050602083039250610331565b505050905090810190601f1680156103815780820380516001836020036101000a031916815260200191505b508481038352888181518152602001915080519060200190808383600083146103c9575b8051825260208311156103c9576020820191506020810190506020830392506103a5565b505050905090810190601f1680156103f55780820380516001836020036101000a031916815260200191505b5084810382528781815181526020019150805190602001908083836000831461043d575b80518252602083111561043d57602082019150602081019050602083039250610419565b505050905090810190601f1680156104695780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390f35b341561048557fe5b6104d5600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611459565b60405180826000191660001916815260200191505060405180910390f35b34156104fb57fe5b61054b600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061148a565b604051808215151515815260200191505060405180910390f35b341561056d57fe5b6105836004808035906020019091905050611a16565b60405180826000191660001916815260200191505060405180910390f35b34156105a957fe5b6105bf6004808035906020019091905050611a41565b604051808060200182810382528381815181526020019150805190602001908083836000831461060e575b80518252602083111561060e576020820191506020810190506020830392506105ea565b505050905090810190601f16801561063a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561065057fe5b6106666004808035906020019091905050611b08565b604051808060200180602001806020018681526020018581526020018481038452898181518152602001915080519060200190808383600083146106c9575b8051825260208311156106c9576020820191506020810190506020830392506106a5565b505050905090810190601f1680156106f55780820380516001836020036101000a031916815260200191505b5084810383528881815181526020019150805190602001908083836000831461073d575b80518252602083111561073d57602082019150602081019050602083039250610719565b505050905090810190601f1680156107695780820380516001836020036101000a031916815260200191505b508481038252878181518152602001915080519060200190808383600083146107b1575b8051825260208311156107b15760208201915060208101905060208303925061078d565b505050905090810190601f1680156107dd5780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390f35b34156107f957fe5b610801611b55565b6040518082815260200191505060405180910390f35b341561081f57fe5b610938600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611b63565b604051808215151515815260200191505060405180910390f35b341561095a57fe5b6109ed600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611e07565b604051808215151515815260200191505060405180910390f35b3415610a0f57fe5b610a496004808061080001906040806020026040519081016040528092919082604060200280828437820191505050505091905050611e1f565b6040518080602001828103825283818151815260200191508051906020019080838360008314610a98575b805182526020831115610a9857602082019150602081019050602083039250610a74565b505050905090810190601f168015610ac45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610ada57fe5b610b06600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612019565b005b6000610b126127a9565b610b1a6127a9565b60006000869350859250835191508183511015610b3657825191505b600090505b81811015610d7b578281815181101515610b5157fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168482815181101515610bcc57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161015610c67577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9450610dcb565b8281815181101515610c7557fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168482815181101515610cf057fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161115610d6c5760019450610dcb565b5b5b8080600101915050610b3b565b825184511015610dad577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9450610dcb565b825184511115610dc05760019450610dcb565b60009450610dcb565b5b5b5050505092915050565b60006000826040518082805190602001908083835b60208310610e0d5780518252602082019150602081019050602083039250610dea565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405180910390206004015490505b919050565b610e546127bd565b610e5c6127a9565b600060006000610e6a6127a9565b6020604051805910610e795750595b908082528060200260200182016040525b50945060009350600092505b6020831015610f55578260080260020a876001900402600102915060007f010000000000000000000000000000000000000000000000000000000000000002827effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141515610f4757818585815181101515610f0e57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535083806001019450505b5b8280600101935050610e96565b83604051805910610f635750595b908082528060200260200182016040525b509050600092505b83831015611029578483815181101515610f9257fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000028184815181101515610feb57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b8280600101935050610f7c565b8095505b5050505050919050565b61103f6127bd565b6110476127bd565b61104f6127bd565b600060006000866040518082805190602001908083835b602083106110895780518252602082019150602081019050602083039250611066565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405180910390206001016000876040518082805190602001908083835b602083106110f557805182526020820191506020810190506020830392506110d2565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405180910390206002016000886040518082805190602001908083835b60208310611161578051825260208201915060208101905060208303925061113e565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405180910390206003016000896040518082805190602001908083835b602083106111cd57805182526020820191506020810190506020830392506111aa565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405180910390206004015460008a6040518082805190602001908083835b6020831061123a5780518252602082019150602081019050602083039250611217565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060050154848054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156113065780601f106112db57610100808354040283529160200191611306565b820191906000526020600020905b8154815290600101906020018083116112e957829003601f168201915b50505050509450838054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156113a25780601f10611377576101008083540402835291602001916113a2565b820191906000526020600020905b81548152906001019060200180831161138557829003601f168201915b50505050509350828054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561143e5780601f106114135761010080835404028352916020019161143e565b820191906000526020600020905b81548152906001019060200180831161142157829003601f168201915b50505050509250945094509450945094505b91939590929450565b60006114636127a9565b82905060008151141561147c5760006001029150611484565b602083015191505b50919050565b60006000600260018054905010156114a55760009150611a10565b600090505b600180549050811015611a0b57611577836001838154811015156114ca57fe5b906000526020600020900160005b508054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561156d5780601f106115425761010080835404028352916020019161156d565b820191906000526020600020905b81548152906001019060200180831161155057829003601f168201915b5050505050611e07565b156119fd576118976000846040518082805190602001908083835b602083106115b55780518252602082019150602081019050602083039250611592565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060c06040519081016040529081600082018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561168d5780601f106116625761010080835404028352916020019161168d565b820191906000526020600020905b81548152906001019060200180831161167057829003601f168201915b50505050508152602001600182018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561172f5780601f106117045761010080835404028352916020019161172f565b820191906000526020600020905b81548152906001019060200180831161171257829003601f168201915b50505050508152602001600282018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156117d15780601f106117a6576101008083540402835291602001916117d1565b820191906000526020600020905b8154815290600101906020018083116117b457829003601f168201915b50505050508152602001600382018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156118735780601f1061184857610100808354040283529160200191611873565b820191906000526020600020905b81548152906001019060200180831161185657829003601f168201915b5050505050815260200160048201548152602001600582015481525050600061205e565b15156118a65760009150611a10565b600060018054905011156119195760016001600180549050038154811015156118cb57fe5b906000526020600020900160005b506001828154811015156118e957fe5b906000526020600020900160005b5090805460018160011615610100020316600290046119179291906127d1565b505b600180548091906001900361192e9190612858565b506000836040518082805190602001908083835b602083106119655780518252602082019150602081019050602083039250611942565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006000820160006119aa9190612884565b6001820160006119ba9190612884565b6002820160006119ca9190612884565b6003820160006119da9190612884565b6004820160009055600582016000905550506119f461254b565b60019150611a10565b5b80806001019150506114aa565b600091505b50919050565b6000611a206127bd565b611a2983611b08565b505050915050611a3881611459565b91505b50919050565b611a496127bd565b600182815481101515611a5857fe5b906000526020600020900160005b508054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611afb5780601f10611ad057610100808354040283529160200191611afb565b820191906000526020600020905b815481529060010190602001808311611ade57829003601f168201915b505050505090505b919050565b611b106127bd565b611b186127bd565b611b206127bd565b60006000611b2c6127bd565b611b3587611a41565b9050611b4081611037565b955095509550955095505b5091939590929450565b600060018054905090505b90565b600060006000611b716128cc565b60009250600091505b600180549050821015611c6357611c4788600184815481101515611b9a57fe5b906000526020600020900160005b508054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611c3d5780601f10611c1257610100808354040283529160200191611c3d565b820191906000526020600020905b815481529060010190602001808311611c2057829003601f168201915b5050505050611e07565b15611c555760019250611c63565b5b8180600101925050611b7a565b8215611c725760009350611dfc565b60018054806001018281611c86919061291b565b916000526020600020900160005b8a90919091509080519060200190611cad929190612947565b505060c06040519081016040528089815260200188815260200187815260200186815260200160008152602001438152509050611ceb81600161205e565b1515611cfa5760009350611dfc565b806000896040518082805190602001908083835b60208310611d315780518252602082019150602081019050602083039250611d0e565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405180910390206000820151816000019080519060200190611d809291906129c7565b506020820151816001019080519060200190611d9d9291906129c7565b506040820151816002019080519060200190611dba9291906129c7565b506060820151816003019080519060200190611dd79291906129c7565b506080820151816004015560a08201518160050155905050611df761254b565b600193505b505050949350505050565b60006000611e158484610b08565b1490505b92915050565b611e276127bd565b611e2f6127a9565b60006000611e3b6127a9565b6040604051805910611e4a5750595b908082528060200260200182016040525b50935060009250600091505b6040821015611f385760007f0100000000000000000000000000000000000000000000000000000000000000028683604081101515611ea257fe5b60200201517effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141515611f2a578582604081101515611ede57fe5b60200201518484815181101515611ef157fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535082806001019350505b5b8180600101925050611e67565b82604051805910611f465750595b908082528060200260200182016040525b509050600091505b8282101561200c578382815181101515611f7557fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000028183815181101515611fce57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b8180600101925050611f5f565b8094505b50505050919050565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b600060006000600060006000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600014151561253b5761212a612125606060405190810160405280602381526020017f5b436f6e73656e737573436f6e74726f6c5d206c6f61642073797374656d416481526020017f64723a0000000000000000000000000000000000000000000000000000000000815250612117612614565b61262c90919063ffffffff16565b61265d565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1694508473ffffffffffffffffffffffffffffffffffffffff16631a129c016000604051606001526040518163ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001828103825260138152602001807f436f6e73656e737573436f6e74726f6c4d677200000000000000000000000000815250602001915050606060405180830381600087803b15156121f457fe5b6102c65a03f1151561220257fe5b50505060405180519060200180519060200180519050505093508373ffffffffffffffffffffffffffffffffffffffff16600014151561253a576122ba6122b5606060405190810160405280602c81526020017f5b436f6e73656e737573436f6e74726f6c5d206c6f616420436f6e73656e737581526020017f73436f6e74726f6c4d67723a00000000000000000000000000000000000000008152506122a7612614565b61262c90919063ffffffff16565b61265d565b8392508273ffffffffffffffffffffffffffffffffffffffff16639f5c50f36000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401809050602060405180830381600087803b151561232957fe5b6102c65a03f1151561233757fe5b5050506040518051905091508173ffffffffffffffffffffffffffffffffffffffff166000141515612539576123e16123dc606060405190810160405280602481526020017f5b436f6e73656e737573436f6e74726f6c5d206c6f616420636f6e74726f6c4181526020017f6464723a000000000000000000000000000000000000000000000000000000008152506123ce612614565b61262c90919063ffffffff16565b61265d565b8190508615612491578073ffffffffffffffffffffffffffffffffffffffff166388fb05796124138a60400151611459565b6000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b151561247257fe5b6102c65a03f1151561248057fe5b505050604051805190509550612540565b8073ffffffffffffffffffffffffffffffffffffffff16636cfc90766124ba8a60400151611459565b6000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b151561251957fe5b6102c65a03f1151561252757fe5b505050604051805190509550612540565b5b5b5b600195505b505050505092915050565b6000600060009150600090505b60018054905081101561260f5781806001019250600060018381548110151561257d57fe5b906000526020600020900160005b5060405180828054600181600116156101000203166002900480156125e75780601f106125c55761010080835404028352918201916125e7565b820191906000526020600020905b8154815290600101906020018083116125d3575b50509150509081526020016040518091039020600401819055505b8080600101915050612558565b5b5050565b61261c612a47565b6126266080612673565b90505b90565b612634612a47565b61264b8284602001516126be90919063ffffffff16565b83602001819052508290505b92915050565b61266f81600001518260200151612729565b5b50565b61267b612a47565b612683612a47565b82816000019063ffffffff16908163ffffffff1681525050602060405190810160405280600081525081602001819052508091505b50919050565b6126c66127bd565b60006000600084518651016040518059106126de5750595b908082528060200260200182016040525b50935060208601925060208501915060208401905061271081848851612752565b61271f86518201838751612752565b5b50505092915050565b6000600061273561279f565b91506000600060006000600060006000898b8a2f90505b50505050565b60005b60208210151561277b57825184526020840193506020830192505b602082039150612755565b6001826020036101000a039050801983511681855116818117865250505b50505050565b6000601090505b90565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061280a5780548555612847565b8280016001018555821561284757600052602060002091601f016020900482015b8281111561284657825482559160010191906001019061282b565b5b5090506128549190612a6e565b5090565b81548183558181151161287f5781836000526020600020918201910161287e9190612a93565b5b505050565b50805460018160011615610100020316600290046000825580601f106128aa57506128c9565b601f0160209004906000526020600020908101906128c89190612a6e565b5b50565b60c0604051908101604052806128e0612abf565b81526020016128ed612abf565b81526020016128fa612abf565b8152602001612907612abf565b815260200160008152602001600081525090565b815481835581811511612942578183600052602060002091820191016129419190612a93565b5b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061298857805160ff19168380011785556129b6565b828001600101855582156129b6579182015b828111156129b557825182559160200191906001019061299a565b5b5090506129c39190612a6e565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612a0857805160ff1916838001178555612a36565b82800160010185558215612a36579182015b82811115612a35578251825591602001919060010190612a1a565b5b509050612a439190612a6e565b5090565b604060405190810160405280600063ffffffff168152602001612a68612abf565b81525090565b612a9091905b80821115612a8c576000816000905550600101612a74565b5090565b90565b612abc91905b80821115612ab85760008181612aaf9190612884565b50600101612a99565b5090565b90565b6020604051908101604052806000815250905600a165627a7a723058209ca23bb531023772b22d159e8a27170476a052debe920875a0174d4abfd0fde10029";

    private NodeAction(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit, Boolean isInitByName) {
        super(BINARY, contractAddress, web3j, credentials, gasPrice, gasLimit, isInitByName);
        if(EncryptType.encryptType == 1) super.setContractBinary(GUOMI_BINARY);
    }

    private NodeAction(String contractAddress, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit, Boolean isInitByName) {
        super(BINARY, contractAddress, web3j, transactionManager, gasPrice, gasLimit, isInitByName);
        if(EncryptType.encryptType == 1) super.setContractBinary(GUOMI_BINARY);
    }

    private NodeAction(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) {
        super(BINARY, contractAddress, web3j, credentials, gasPrice, gasLimit, false);
        if(EncryptType.encryptType == 1) super.setContractBinary(GUOMI_BINARY);
    }

    private NodeAction(String contractAddress, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) {
        super(BINARY, contractAddress, web3j, transactionManager, gasPrice, gasLimit, false);
        if(EncryptType.encryptType == 1) super.setContractBinary(GUOMI_BINARY);
    }

    public static List<LogMessageEventResponse> getLogMessageEvents(TransactionReceipt transactionReceipt) {
        final Event event = new Event("LogMessage", 
                Arrays.<TypeReference<?>>asList(),
                Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {}, new TypeReference<Uint256>() {}, new TypeReference<Utf8String>() {}));
        List<EventValues> valueList = extractEventParameters(event, transactionReceipt);
        ArrayList<LogMessageEventResponse> responses = new ArrayList<LogMessageEventResponse>(valueList.size());
        for (EventValues eventValues : valueList) {
            LogMessageEventResponse typedResponse = new LogMessageEventResponse();
            typedResponse.addr = (Address) eventValues.getNonIndexedValues().get(0);
            typedResponse.code = (Uint256) eventValues.getNonIndexedValues().get(1);
            typedResponse.msg = (Utf8String) eventValues.getNonIndexedValues().get(2);
            responses.add(typedResponse);
        }
        return responses;
    }

    public Observable<LogMessageEventResponse> logMessageEventObservable(DefaultBlockParameter startBlock, DefaultBlockParameter endBlock) {
        final Event event = new Event("LogMessage", 
                Arrays.<TypeReference<?>>asList(),
                Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {}, new TypeReference<Uint256>() {}, new TypeReference<Utf8String>() {}));
        EthFilter filter = new EthFilter(startBlock, endBlock, getContractAddress());
        filter.addSingleTopic(EventEncoder.encode(event));
        return web3j.ethLogObservable(filter).map(new Func1<Log, LogMessageEventResponse>() {
            @Override
            public LogMessageEventResponse call(Log log) {
                EventValues eventValues = extractEventParameters(event, log);
                LogMessageEventResponse typedResponse = new LogMessageEventResponse();
                typedResponse.addr = (Address) eventValues.getNonIndexedValues().get(0);
                typedResponse.code = (Uint256) eventValues.getNonIndexedValues().get(1);
                typedResponse.msg = (Utf8String) eventValues.getNonIndexedValues().get(2);
                return typedResponse;
            }
        });
    }

    public Future<Utf8String> byte64ToString(StaticArray<Bytes1> x) {
        Function function = new Function("byte64ToString", 
                Arrays.<Type>asList(x), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Utf8String>() {}));
        return executeCallSingleValueReturnAsync(function);
    }

    public Future<TransactionReceipt> cancelNode(Utf8String _id) {
        Function function = new Function("cancelNode", Arrays.<Type>asList(_id), Collections.<TypeReference<?>>emptyList());
        return executeTransactionAsync(function);
    }

    public void cancelNode(Utf8String _id, TransactionSucCallback callback) {
        Function function = new Function("cancelNode", Arrays.<Type>asList(_id), Collections.<TypeReference<?>>emptyList());
        executeTransactionAsync(function, callback);
    }

    public Future<TransactionReceipt> setSystemAddr(Address addr) {
        Function function = new Function("setSystemAddr", Arrays.<Type>asList(addr), Collections.<TypeReference<?>>emptyList());
        return executeTransactionAsync(function);
    }

    public void setSystemAddr(Address addr, TransactionSucCallback callback) {
        Function function = new Function("setSystemAddr", Arrays.<Type>asList(addr), Collections.<TypeReference<?>>emptyList());
        executeTransactionAsync(function, callback);
    }

    public Future<TransactionReceipt> compare(Utf8String _a, Utf8String _b) {
        Function function = new Function("compare", Arrays.<Type>asList(_a, _b), Collections.<TypeReference<?>>emptyList());
        return executeTransactionAsync(function);
    }

    public void compare(Utf8String _a, Utf8String _b, TransactionSucCallback callback) {
        Function function = new Function("compare", Arrays.<Type>asList(_a, _b), Collections.<TypeReference<?>>emptyList());
        executeTransactionAsync(function, callback);
    }

    public Future<TransactionReceipt> equal(Utf8String _a, Utf8String _b) {
        Function function = new Function("equal", Arrays.<Type>asList(_a, _b), Collections.<TypeReference<?>>emptyList());
        return executeTransactionAsync(function);
    }

    public void equal(Utf8String _a, Utf8String _b, TransactionSucCallback callback) {
        Function function = new Function("equal", Arrays.<Type>asList(_a, _b), Collections.<TypeReference<?>>emptyList());
        executeTransactionAsync(function, callback);
    }

    public Future<Uint256> getNodeIdsLength() {
        Function function = new Function("getNodeIdsLength", 
                Arrays.<Type>asList(), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {}));
        return executeCallSingleValueReturnAsync(function);
    }

    public Future<Utf8String> bytes32ToString(Bytes32 x) {
        Function function = new Function("bytes32ToString", 
                Arrays.<Type>asList(x), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Utf8String>() {}));
        return executeCallSingleValueReturnAsync(function);
    }

    public Future<List<Type>> getNode(Utf8String _id) {
        Function function = new Function("getNode", 
                Arrays.<Type>asList(_id), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Utf8String>() {}, new TypeReference<Utf8String>() {}, new TypeReference<Utf8String>() {}, new TypeReference<Uint256>() {}, new TypeReference<Uint256>() {}));
        return executeCallMultipleValueReturnAsync(function);
    }

    public Future<List<Type>> getNodeByIdx(Uint256 _index) {
        Function function = new Function("getNodeByIdx", 
                Arrays.<Type>asList(_index), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Utf8String>() {}, new TypeReference<Utf8String>() {}, new TypeReference<Utf8String>() {}, new TypeReference<Uint256>() {}, new TypeReference<Uint256>() {}));
        return executeCallMultipleValueReturnAsync(function);
    }

    public Future<Utf8String> getNodeId(Uint256 _index) {
        Function function = new Function("getNodeId", 
                Arrays.<Type>asList(_index), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Utf8String>() {}));
        return executeCallSingleValueReturnAsync(function);
    }

    public Future<TransactionReceipt> stringToBytes32(Utf8String source) {
        Function function = new Function("stringToBytes32", Arrays.<Type>asList(source), Collections.<TypeReference<?>>emptyList());
        return executeTransactionAsync(function);
    }

    public void stringToBytes32(Utf8String source, TransactionSucCallback callback) {
        Function function = new Function("stringToBytes32", Arrays.<Type>asList(source), Collections.<TypeReference<?>>emptyList());
        executeTransactionAsync(function, callback);
    }

    public Future<TransactionReceipt> getNodeAgencyByIdx(Uint256 _index) {
        Function function = new Function("getNodeAgencyByIdx", Arrays.<Type>asList(_index), Collections.<TypeReference<?>>emptyList());
        return executeTransactionAsync(function);
    }

    public void getNodeAgencyByIdx(Uint256 _index, TransactionSucCallback callback) {
        Function function = new Function("getNodeAgencyByIdx", Arrays.<Type>asList(_index), Collections.<TypeReference<?>>emptyList());
        executeTransactionAsync(function, callback);
    }

    public Future<TransactionReceipt> registerNode(Utf8String _id, Utf8String _name, Utf8String _agency, Utf8String _caHash) {
        Function function = new Function("registerNode", Arrays.<Type>asList(_id, _name, _agency, _caHash), Collections.<TypeReference<?>>emptyList());
        return executeTransactionAsync(function);
    }

    public void registerNode(Utf8String _id, Utf8String _name, Utf8String _agency, Utf8String _caHash, TransactionSucCallback callback) {
        Function function = new Function("registerNode", Arrays.<Type>asList(_id, _name, _agency, _caHash), Collections.<TypeReference<?>>emptyList());
        executeTransactionAsync(function, callback);
    }

    public Future<Uint256> getNodeIdx(Utf8String _id) {
        Function function = new Function("getNodeIdx", 
                Arrays.<Type>asList(_id), 
                Arrays.<TypeReference<?>>asList(new TypeReference<Uint256>() {}));
        return executeCallSingleValueReturnAsync(function);
    }

    public static Future<NodeAction> deploy(Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit, BigInteger initialWeiValue) {
        if(EncryptType.encryptType == 1) setBinary(getGuomiBinary());
        return deployAsync(NodeAction.class, web3j, credentials, gasPrice, gasLimit, BINARY, "", initialWeiValue);
    }

    public static Future<NodeAction> deploy(Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit, BigInteger initialWeiValue) {
        if(EncryptType.encryptType == 1) setBinary(getGuomiBinary());
        return deployAsync(NodeAction.class, web3j, transactionManager, gasPrice, gasLimit, BINARY, "", initialWeiValue);
    }

    public static NodeAction load(String contractAddress, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) {
        return new NodeAction(contractAddress, web3j, credentials, gasPrice, gasLimit, false);
    }

    public static NodeAction load(String contractAddress, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) {
        return new NodeAction(contractAddress, web3j, transactionManager, gasPrice, gasLimit, false);
    }

    public static NodeAction loadByName(String contractName, Web3j web3j, Credentials credentials, BigInteger gasPrice, BigInteger gasLimit) {
        return new NodeAction(contractName, web3j, credentials, gasPrice, gasLimit, true);
    }

    public static NodeAction loadByName(String contractName, Web3j web3j, TransactionManager transactionManager, BigInteger gasPrice, BigInteger gasLimit) {
        return new NodeAction(contractName, web3j, transactionManager, gasPrice, gasLimit, true);
    }

    public static void setBinary(String binary) {
        BINARY = binary;
    }

    public static String getGuomiBinary() {
        return GUOMI_BINARY;
    }

    public static class LogMessageEventResponse {
        public Address addr;

        public Uint256 code;

        public Utf8String msg;
    }
}
